import { defineStore } from 'pinia'

export const useSettingStore = defineStore('setting', () => {
  const setting = reactive({
    locale: 'en',

    theme: 'default'
  })

  const setLocal = (locale) => {
    setting.locale = locale
  }

  const setTheme = (theme) => {
    setting.theme = theme
  }

  return { setLocal,setTheme, setting }
}, {
  persist: true,
})
